var React=require('React');
//var RssSourceItem=require('../components/RssSourceItem');

var RssSourceLayout=React.createClass({
  render:function(){
    // This section should be hidden by default
    // and shown when there are todos.
    if (Object.keys(this.props.sources).length < 1) {
      return null;
    }

    var allSource = this.props.sources;
    var sources = [];

    for (var key in allSource) {
      //sources.push(<RssSourceItem key={key} item={allSource[key]} />);
      sources.push(<li id={key}>{allSource[key].text}</li>);
    }

    return (
      <section id="main">
        <ul id="source-list">{sources}</ul>
      </section>
    )
  }
});

module.exports=RssSourceLayout;
